package com.easy.dn.ui.usercenter.presenter;

import com.easy.common.baserx.RxSubscriber;
import com.easy.dn.bean.UserInfoBean;
import com.easy.dn.ui.usercenter.contract.LoginContract;

import java.util.Map;

/**
 * Created by DN on 2017/5/3.
 */

public class LoginPresenter extends LoginContract.Presenter {

    @Override
    public void getUserInfoData(Map<String, String> map) {
        mRxManage.add(mModel.ObtainUserInfoData(map).subscribe(new RxSubscriber<UserInfoBean>(mContext,true) {
            @Override
            protected void _onNext(UserInfoBean bean) {
                mView.returnUserInfoData(bean);
            }

            @Override
            protected void _onError(String message) {
                mView.showErrorTip(message);
            }
        }));
    }
}
